﻿using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel.DataAnnotations.Schema;

namespace Scrubblet.FrontEnd.Models.Entities
{
    public class Game
    {
        public Game()
        {
            Players = new Collection<GamePlayer>();
            TilesInBag = new Collection<Tile>();
            Moves = new Collection<GameMove>();
        }

        public int Id { get; set; }
        public string Name { get; set; }
        public virtual BoardConfigurationVersion Board { get; set; }
        public virtual TileSet TileSet { get; set; }
        [ForeignKey("Creator")]
        public int CreatorId { get; set; }
        public virtual UserProfile Creator { get; set; }
        public DateTime CreatedTime { get; set; }
        public virtual ICollection<GamePlayer> Players { get; set; }
        public GameMoveType CurrentMoveType { get; set; }
        public virtual UserProfile CurrentMovePlayer { get; set; }
        public virtual ICollection<Tile> TilesInBag { get; set; }
        public virtual ICollection<GameMove> Moves { get; set; }
        public GameState State { get; set; }
    }
}